UCF STIG Viewer Logo

The macOS system must disable Media Sharing.


Overview

Finding ID Version Rule ID IA Controls Severity
V-259518 APPL-14-002100 SV-259518r941176_rule Medium
Description
Media sharing must be disabled. When Media Sharing is enabled, the computer starts a network listening service that shares the contents of the user's music collection with other users in the same subnet. The information system must be configured to provide only essential capabilities. Disabling Media Sharing helps prevent the unauthorized connection of devices and the unauthorized transfer of information. Disabling Media Sharing mitigates this risk. Note: The Media Sharing preference panel will still allow "Home Sharing" and "Share media with guests" to be checked but the service will not be enabled.
STIG Date
Apple macOS 14 (Sonoma) Security Technical Implementation Guide 2024-01-10

Details

Check Text ( C-63257r941174_chk )
Verify the macOS system is configured to disable media sharing with the following command:

/usr/bin/osascript -l JavaScript << EOS
function run() {
let pref1 = ObjC.unwrap($.NSUserDefaults.alloc.initWithSuiteName('com.apple.preferences.sharing.SharingPrefsExtension')\
.objectForKey('homeSharingUIStatus'))
let pref2 = ObjC.unwrap($.NSUserDefaults.alloc.initWithSuiteName('com.apple.preferences.sharing.SharingPrefsExtension')\
.objectForKey('legacySharingUIStatus'))
let pref3 = ObjC.unwrap($.NSUserDefaults.alloc.initWithSuiteName('com.apple.preferences.sharing.SharingPrefsExtension')\
.objectForKey('mediaSharingUIStatus'))
if ( pref1 == 0 && pref2 == 0 && pref3 == 0 ) {
return("true")
} else {
return("false")
}
}
EOS

If the result is not "true", this is a finding.
Fix Text (F-63165r941175_fix)
Configure the macOS system to disable media sharing by installing the "com.apple.preferences.sharing.SharingPrefsExtension" configuration profile.